package org.hibernate.validator.cfg.defs;

import java.lang.annotation.ElementType;
import javax.validation.Payload;
import org.hibernate.validator.cfg.ConstraintDef;
import org.hibernate.validator.cfg.ConstraintMapping;

public class GenericConstraintDef extends ConstraintDef {
	public GenericConstraintDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
		super(beanType, (Class)null, property, elementType, mapping);
	}

	@Override
	public GenericConstraintDef message(String message) {
		super.message(message);
		return this;
	}

	public GenericConstraintDef param(String key, Object value) {
		this.addParameter(key, value);
		return this;
	}

	public GenericConstraintDef constraintType(Class<?> constraintType) {
		this.constraintType = constraintType;
		return this;
	}
}